<template>
    <div>
        <a-modal
            :visible="visible"
            title="合同审核单"
            :maskClosable="false"
            :closable="true"
            :destroyOnClose="true"
            width="100%"
            :dialog-style="{ margin: '0 auto'}"
            wrapClassName="htzfsq-modal"
            @cancel="closeVisible"
            >
            <div class="internalControl-contractPay-summary-table-5">
                <div class="tabs-card-edit-box">
                    <a-tabs type="card" v-model:activeKey="summaryActiveKey" @change="summaryActiveChange">
                        <a-tab-pane key="申请表" tab="申请表"></a-tab-pane>
                        <a-tab-pane v-if="linkName == '我的已办'" key="流转记录" tab="流转记录"></a-tab-pane>
                    </a-tabs>
                </div>
                <div ref="scrollToBottomDiv" class="tab-box-v1" :key="tableKey" style="height:calc(100vh - 200px);overflow: auto,paddingTop: 15px">
                    <div v-if="summaryActiveKey == '申请表'" style="width: 70%;margin: 0 auto;">
                        <a-spin :spinning="spinning">
                            <a-button class="blue-btn" style="margin-top: 20px;" @click="printClick(formState,qmImgList)" v-if="linkName == '我的已办'">打印</a-button>
                            <a-form :form="aform" ref="form" class="internalControl-contractPay-model-form-box">
                                <a-descriptions title="合同审核单" bordered :column="2">
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText"  v-if="linkName == '合同起草'">*</span>
                                            合同名称
                                        </span>
                                        <a-form-model-item prop="fhtmc">
                                            <a-input
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fhtmc"
                                                placeholder="请输入合同名称"
                                                v-decorator="[
                                                'fhtmc', {initialValue:formState.fhtmc,rules: rules.fhtmc}]"
                                            />
                                            <span v-else>{{ formState.fhtmc }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText"  v-if="linkName == '合同起草'">*</span>
                                            中标供应商名称
                                        </span>
                                        <a-form-model-item prop="fzbgysmc">
                                            <a-input
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fzbgysmc"
                                                placeholder="请输入中标供应商名称"
                                                v-decorator="[
                                                'fzbgysmc', {initialValue:formState.fzbgysmc,rules: rules.fzbgysmc}]"
                                            />
                                            <span v-else>{{ formState.fzbgysmc }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText"  v-if="linkName == '合同起草'">*</span>
                                            合同金额
                                        </span>
                                        <a-form-model-item prop="fhtje">
                                            <a-input-number
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fhtje"
                                                placeholder="请输入合同金额"
                                                style="width: 100%;"
                                                v-decorator="[
                                                'fhtje', {initialValue:formState.fhtje,rules: rules.fhtje}]"
                                            />
                                            <span v-else>{{ formState.fhtje }} 元</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText"  v-if="linkName == '合同起草'">*</span>
                                            节约金额
                                        </span>
                                        <a-form-model-item prop="fjyje">
                                            <a-input-number
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fjyje"
                                                placeholder="请输入节约金额"
                                                style="width: 100%;"
                                                v-decorator="[
                                                'fjyje', {initialValue:formState.fjyje,rules: rules.fjyje}]"
                                            />
                                            <span v-else>{{ formState.fjyje }} 元</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText"  v-if="linkName == '合同起草'">*</span>
                                            是否属于政府采购
                                        </span>
                                        <a-form-model-item prop="fcgfs">
                                            <a-radio-group
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fsfzfcg"
                                                name="radioGroup"
                                                v-decorator="[
                                                    'fsfzfcg', {initialValue:formState.fsfzfcg,rules: rules.fsfzfcg}]"
                                                >
                                                <a-radio value="是">
                                                    是
                                                </a-radio>
                                                <a-radio value="否">
                                                    否
                                                </a-radio>
                                            </a-radio-group>
                                            <span v-else>{{ formState.fsfzfcg }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText"  v-if="linkName == '合同起草'">*</span>
                                            采购品目
                                        </span>
                                        <a-form-model-item prop="fcgfs">
                                            <a-radio-group
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fcgpm"
                                                name="radioGroup"
                                                v-decorator="[
                                                    'fcgpm', {initialValue:formState.fcgpm,rules: rules.fcgpm}]"
                                                >
                                                <a-radio value="货物">
                                                    货物
                                                </a-radio>
                                                <a-radio value="服务">
                                                    服务
                                                </a-radio>
                                                <a-radio value="课题">
                                                    课题
                                                </a-radio>
                                            </a-radio-group>
                                            <span v-else>{{ formState.fcgpm }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText"  v-if="linkName == '合同起草'">*</span>
                                            采购方式
                                        </span>
                                        <a-form-model-item prop="fcgfs">
                                            <a-input
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fcgfs"
                                                placeholder="请输入采购方式"
                                                v-decorator="[
                                                'fcgfs', {initialValue:formState.fcgfs,rules: rules.fcgfs}]"
                                            />
                                            <span v-else>{{ formState.fcgfs }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            合同编号
                                        </span>
                                        <a-form-model-item prop="fhtbh">
                                            <a-input
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fhtbh"
                                                placeholder="请输入合同编号"
                                                v-decorator="[
                                                'fhtbh', {initialValue:formState.fhtbh,rules: rules.fhtbh}]"
                                            />
                                            <span v-else>{{ formState.fhtbh?formState.fhtbh:'-' }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            所属项目编号
                                        </span>
                                        <a-form-model-item prop="fssxmbh">
                                            <a-input
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fssxmbh"
                                                placeholder="请输入所属项目编号"
                                                v-decorator="[
                                                'fssxmbh', {initialValue:formState.fssxmbh,rules: rules.fssxmbh}]"
                                            />
                                            <span v-else>{{ formState.fssxmbh?formState.fssxmbh:'-' }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            采购代理机构
                                        </span>
                                        <a-form-model-item prop="fcgdljg">
                                            <a-input
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                v-model="formState.fcgdljg"
                                                placeholder="请输入采购代理机构"
                                                v-decorator="[
                                                'fcgdljg', {initialValue:formState.fcgdljg,rules: rules.fcgdljg}]"
                                            />
                                            <span v-else>{{ formState.fcgdljg?formState.fcgdljg:'-' }}</span>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot" style="display: block;text-align: center;">
                                            行政审批单
                                            <a-button
                                                style="display: block;margin:0 auto"
                                                class="orange-btn"
                                                @click="selectApplyForClick"
                                                v-if="(linkName=='合同起草' || linkName == '数据修订') && !formState.fxzswmc">
                                                  选择行政审批单
                                            </a-button>
                                        </span>
                                        <a-form-model-item prop="fxzswmc">
                                            <a-input
                                                v-if="linkName=='合同起草' || linkName == '数据修订'"
                                                :disabled="true"
                                                v-model="formState.fxzswmc"
                                                style="width: calc(100% - 120px);"
                                                placeholder="点击勾选，无需填写"/>
                                            <span v-else>{{ formState.fxzswmc }}</span>
                                            <a-icon @click="delContractClick" v-if="formState.fxzswmc && linkName=='合同起草'" type="delete" style="color: red;margin-left: 10px;font-size: 18px;"/>
                                            <a-button class="green-btn" v-if="formState.fxzswmc" @click="applyForView" icon="eye" style="margin-left: 10px;">预览</a-button>
                                        </a-form-model-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item>
                                        <span slot="label" class="descriptions-label-slot">
                                            附&emsp;&emsp;件
                                        </span>
                                        <a-form-item class="zm-form-model">
                                            <uploadFilesList :config="uploadFilesListConfig" @emitFormid="emitFormid" :filesFormState="{...formState}"/>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('科室经办人审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('科室经办人审核').hjmc">*</span>
                                            科室经办人审核
                                        </span>
                                        <a-form-item ref="fjbrshyj" prop="fjbrshyj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('科室经办人审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fjbrshyj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fjbrshyj,'fjbrshyj')"
                                                    v-decorator="[
                                                        'fjbrshyj', { initialValue:formState.fjbrshyj, rules: rules.fjbrshyj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fjbrshyjsj)"
                                                        :default-value="moment(formState.fjbrshyjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fjbrshyjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fjbrshyj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('科室经办人审核')" :src="getUrl('科室经办人审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fjbrshr }}</span>
                                                    <span>{{ formState.fjbrshyjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('科室负责人审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('科室负责人审核').hjmc">*</span>
                                            科室负责人审核
                                        </span>
                                        <a-form-item ref="fksfzrshryj" prop="fksfzrshryj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('科室负责人审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fksfzrshryj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fksfzrshryj,'fksfzrshryj')"
                                                    v-decorator="[
                                                        'fksfzrshryj', { initialValue:formState.fksfzrshryj, rules: rules.fksfzrshryj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fksfzrshryjsj)"
                                                        :default-value="moment(formState.fksfzrshryjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fksfzrshryjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fksfzrshryj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('科室负责人审核')" :src="getUrl('科室负责人审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fksfzrshr }}</span>
                                                    <span>{{ formState.fksfzrshryjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('质管科经办人审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('质管科经办人审核').hjmc">*</span>
                                            质管科经办人审核
                                        </span>
                                        <a-form-item ref="fzgkjbryj" prop="fzgkjbryj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('质管科经办人审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fzgkjbryj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fzgkjbryj,'fzgkjbryj')"
                                                    v-decorator="[
                                                        'fzgkjbryj', { initialValue:formState.fzgkjbryj, rules: rules.fzgkjbryj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fzgkjbryjsj)"
                                                        :default-value="moment(formState.fzgkjbryjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fzgkjbryjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fzgkjbryj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('质管科经办人审核')" :src="getUrl('质管科经办人审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fzgkjbr }}</span>
                                                    <span>{{ formState.fzgkjbryjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('质管科负责人审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('质管科负责人审核').hjmc">*</span>
                                            质管科负责人审核
                                        </span>
                                        <a-form-item ref="fzgkfzryj" prop="fzgkfzryj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('质管科负责人审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fzgkfzryj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fzgkfzryj,'fzgkfzryj')"
                                                    v-decorator="[
                                                        'fzgkfzryj', { initialValue:formState.fzgkfzryj, rules: rules.fzgkfzryj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fzgkfzryjsj)"
                                                        :default-value="moment(formState.fzgkfzryjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fzgkfzryjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fzgkfzryj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('质管科负责人审核')" :src="getUrl('质管科负责人审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fzgkfzr }}</span>
                                                    <span>{{ formState.fzgkfzryjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('办公室法务审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('办公室法务审核').hjmc">*</span>
                                            办公室法务审核
                                        </span>
                                        <a-form-item ref="fbgsfwshryj" prop="fbgsfwshryj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('办公室法务审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fbgsfwshryj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fbgsfwshryj,'fbgsfwshryj')"
                                                    v-decorator="[
                                                        'fbgsfwshryj', { initialValue:formState.fbgsfwshryj, rules: rules.fbgsfwshryj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fbgsfwshryjsj)"
                                                        :default-value="moment(formState.fbgsfwshryjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fbgsfwshryjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fbgsfwshryj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('办公室法务审核')" :src="getUrl('办公室法务审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fbgsfwshr }}</span>
                                                    <span>{{ formState.fbgsfwshryjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('办公室财务审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('办公室财务审核').hjmc">*</span>
                                            办公室财务审核
                                        </span>
                                        <a-form-item ref="fbgscwshryj" prop="fbgscwshryj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('办公室财务审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fbgscwshryj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fbgscwshryj,'fbgscwshryj')"
                                                    v-decorator="[
                                                        'fbgscwshryj', { initialValue:formState.fbgscwshryj, rules: rules.fbgscwshryj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fbgscwshryjsj)"
                                                        :default-value="moment(formState.fbgscwshryjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fbgscwshryjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fbgscwshryj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('办公室财务审核')" :src="getUrl('办公室财务审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fbgscwshr }}</span>
                                                    <span>{{ formState.fbgscwshryjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('办公室负责人审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('办公室负责人审核').hjmc">*</span>
                                            办公室负责人审核
                                        </span>
                                        <a-form-item ref="fbgsfzrshryj" prop="fbgsfzrshryj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('办公室负责人审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fbgsfzrshryj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fbgsfzrshryj,'fbgsfzrshryj')"
                                                    v-decorator="[
                                                        'fbgsfzrshryj', { initialValue:formState.fbgsfzrshryj, rules: rules.fbgsfzrshryj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fbgsfzrshryjsj)"
                                                        :default-value="moment(formState.fbgsfzrshryjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fbgsfzrshryjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fbgsfzrshryj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('办公室负责人审核')" :src="getUrl('办公室负责人审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fbgsfzrshr }}</span>
                                                    <span>{{ formState.fbgsfzrshryjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('分管领导审核').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('分管领导审核').hjmc">*</span>
                                            分管领导审核
                                        </span>
                                        <a-form-item ref="ffgldshryj" prop="ffgldshryj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('分管领导审核').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'ffgldshryj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.ffgldshryj,'ffgldshryj')"
                                                    v-decorator="[
                                                        'ffgldshryj', { initialValue:formState.ffgldshryj, rules: rules.ffgldshryj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.ffgldshryjsj)"
                                                        :default-value="moment(formState.ffgldshryjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'ffgldshryjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.ffgldshryj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('分管领导审核')" :src="getUrl('分管领导审核')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.ffgldshr }}</span>
                                                    <span>{{ formState.ffgldshryjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                    <a-descriptions-item :span="2" v-if="descriptionsData('中心主任审批').hjmc">
                                        <span slot="label" class="descriptions-label-slot">
                                            <span class="xhText" v-if="linkName == descriptionsData('中心主任审批').hjmc">*</span>
                                            中心主任审批
                                        </span>
                                        <a-form-item ref="fzxldspyj" prop="fzxldspyj" class="zm-form-model">
                                            <div style="width: 100%;" v-if="(descriptionsData('中心主任审批').blzt !== '已办' && linkName!=='我的已办') || linkName == '数据修订'">
                                                <reviewOpinions
                                                    :ref="'reviewOpinionsRef'+'fzxldspyj'"
                                                    @getInputOpinion="getInputOpinion"
                                                    @openOpinions="opinions('内控合同支付',formState.fzxldspyj,'fzxldspyj')"
                                                    v-decorator="[
                                                        'fzxldspyj', { initialValue:formState.fzxldspyj, rules: rules.fzxldspyj}
                                                ]"/>
                                                <div  v-if="linkName == '数据修订'" style="text-align: right;">
                                                    <span>办理时间：</span>
                                                    <a-date-picker
                                                        show-time
                                                        :v-model="moment(formState.fzxldspyjsj)"
                                                        :default-value="moment(formState.fzxldspyjsj)"
                                                        :allowClear="false"
                                                        @change="yjTimeChange($event,'fzxldspyjsj')"
                                                    />
                                                </div>
                                            </div>
                                            <div style="width: 100%;" v-else>
                                                <p>{{ formState.fzxldspyj }}</p>
                                                <div class="yjqm-right-bottom">
                                                    <img v-if="getUrl('中心主任审批')" :src="getUrl('中心主任审批')" alt="" class="yjqmImg"/>
                                                    <span v-else class="yjqmImg">{{ formState.fzxldspr }}</span>
                                                    <span>{{ formState.fzxldspyjsj }}</span>
                                                </div>
                                            </div>
                                        </a-form-item>
                                    </a-descriptions-item>
                                </a-descriptions>
                            </a-form>
                        </a-spin>
                    </div>
                    <div v-if="summaryActiveKey == '流转记录'" style="padding-top: 30px;">
                        <transferRecords
                            :key="transferRecordsKey"
                            ref="transferRecordsRef"
                            :config="circulationDataTableConfig"
                            @getCirculationQmImg="getCirculationQmImg"/>
                    </div>
                </div>
            </div>
            <template slot="footer">
                <div v-if="linkName == '我的已办'">
                    <a-button class="blue-btn" @click="closeVisible">关闭</a-button>
                </div>
                <div v-else-if="linkName == '数据修订'">
                    <a-button class="blue-btn" @click="updataData">确认修订</a-button>
                </div>
                <div v-else>
                    <a-button @click="onSave">
                        保存
                    </a-button>
                    <a-button class="blue-btn" @click="onSubmit">
                        提交
                    </a-button>
                    <a-button v-if="linkName !== '合同起草'" class="red-btn" @click="returnClick">
                        退回
                    </a-button>
                </div>
            </template>
        </a-modal>
        <selectApplyForModal ref="SelectContractModal" @getApplicantData="getApplicantData" />
        <printModal ref="printModalRef" />
        <oaModal v-show="false" ref="oaModalRef" ></oaModal>
    </div>
</template>
<script>
import compSelector from '@/components/compSelector/compSelector'
import {
    initBzFlow,
    saveFlow,
    submitFlow,
    queryJobByJobId,
    returnUpperzdyFlowJob,
    pidgetlchj,
    getMoreUserSignLinkList,
    selectSpd,
    deleteSpd,
    selectHtByHtid, selectxmysBysid,flowJkPage,downMyQm,jsHtRemainingAmount,
} from './service/index'
import transferRecords from '../../../../administrativeOffice-new/modal/transferRecords'
import assessCheckApi from './service/api.js'
import printModal from './print'
import uploadFilesList from '../../../../administrativeOffice-new/modal/uploadFilesList'
import selectApplyForModal from './selectApplyForModal'
import moment from 'moment'
export default {
    props:{},
    components:{
        compSelector,
        transferRecords,
        printModal,
        uploadFilesList,
        selectApplyForModal,
        oaModal: () => import('@/views/administrativeOffice-new/yiBan/index')
    },
    data() {
        return {
            moment:moment,
            visible: false,
            aform:this.$form.createForm(this, { name: 'aform' }),
            formState: {},
            rules:{
                fhtmc: [{ required: true, message: '请输入合同名称', trigger: 'blur' }],
                fzbgysmc: [{ required: true, message: '请输入中标供应商名称', trigger: 'blur' }],
                fhtje: [{ type:'number', required: true, message: '请输入合同金额', trigger: 'blur' }],
                fjyje: [{ type:'number', required: true, message: '请输入节约金额', trigger: 'blur' }],
                fcgfs: [{ required: true, message: '请输入采购方式', trigger: 'blur' }],
                fsfzfcg: [{ required: true, message: '请选择是否政府采购', trigger: 'blur' }],
                fcgpm: [{ required: true, message: '请选择采购品目', trigger: 'blur' }],

                fjbrshyj: [{ required: true, message: '请输入科室经办人审核意见', trigger: 'blur' }],
                fksfzrshryj: [{ required: true, message: '请输入科室负责人审核意见', trigger: 'blur' }],
                fzgkjbryj: [{ required: true, message: '请输入质管科经办人审核意见', trigger: 'blur' }],
                fzgkfzryj: [{ required: true, message: '请输入质管科负责人审核意见', trigger: 'blur' }],
                fbgsfwshryj: [{ required: true, message: '请输入办公室法务审核意见', trigger: 'blur' }],
                fbgscwshryj: [{ required: true, message: '请输入办公室财务审核意见', trigger: 'blur' }],
                fbgsfzrshryj: [{ required: true, message: '请输入办公室负责人审核意见', trigger: 'blur' }],
                ffgldshryj: [{ required: true, message: '请输入分管领导审核意见', trigger: 'blur' }],
                fzxldspyj: [{ required: true, message: '请输入中心主任审批意见', trigger: 'blur' }],
            },
            circulationDataTableConfig: {
                api: assessCheckApi.flowJkPage,
                rowId: 'id',
                urlType: true,
                paramet:{
                    oaid: ''
                }
            },
            transferRecordsKey: '',
            summaryActiveKey: '申请表',
            tableKey: '',
            spinning: false,
            linkName: '合同起草',
            qmImgList: [],
            displayList: [],
            uploadFilesListConfig: {
                isUpload: false,
                fjAddApi: assessCheckApi.initBzFlow,
            },
        }
    },
    mounted() {
        //console.log('怎么回事？？？')
        this.$nextTick(() => {
            //console.log('没进来吗？？？')
            const scrollDiv = this.$refs.scrollToBottomDiv;
            //console.log('scrollDiv：',scrollDiv)
            //console.log('高度：',scrollDiv.scrollHeight)
            scrollDiv.scrollTop = scrollDiv.scrollHeight;
        });
    },
    methods: {
        getData(val,val1){
            //console.log(val,val1)
            if(val && val.hjmc){
                this.linkName = val.hjmc
                this.formState = {}
                this.formState = {
                    ...val.oaMap,
                    jobid: val.jobMap?val.jobMap.id:''
                }
                this.formState.fhtje = this.formState.fhtje?Number(this.formState.fhtje):null
                this.formState.fjyje = this.formState.fjyje?Number(this.formState.fjyje):null
                this.circulationDataTableConfig.paramet.oaid = this.formState.id
                //console.log('this.circulationDataTableConfig',this.circulationDataTableConfig)
                this.qmImgList = []
                this.displayList = []
                this.getDisplayList()
            } else {
                this.formState = {}
            }
            this.uploadFilesListConfig.isUpload = (this.linkName == '合同起草' || this.linkName == '数据修订')?true:false
        },
        // scrollToBottom(){
        //     this.$nextTick(() => {
        //         //console.log('没进来吗？？？')
        //         const scrollDiv = this.$refs.scrollToBottomDiv;
        //         //console.log('scrollDiv：',scrollDiv)
        //         //console.log('高度：',scrollDiv.scrollHeight)
        //         scrollDiv.scrollTop = scrollDiv.scrollHeight + 100;
        //     });
        // },
        getDisplayList(){
            pidgetlchj({pid:this.formState.id}).then((res) => {
                let arr1 = res.result
                this.displayList = []
                this.displayList = res.result

                if(this.linkName == '数据修订'){
                    const index = this.displayList.findIndex((item) => item.blzt == '待办');
                    if (index !== -1) {
                        this.displayList.splice(index, 1);
                    }
                    //console.log('this.displayList',this.displayList)
                }

                arr1.forEach(async item => {
                    if(item.blrid && item.blzt!=='待办'){
                        let resa = await getMoreUserSignLinkList({ids:item.blrid})
                        if(resa.success && resa.result.length){
                            if(resa.result[0].signLink == ''){
                                // //console.log('没有获得图片 signLink == 0')
                                this.qmImgList.push({
                                    hjmc: item.hjmc,
                                    url: null
                                })
                            } else {
                                this.qmImgList.push({
                                    hjmc: item.hjmc,
                                    url: resa.result[0].signLink+'&aa='+Date.now()
                                })
                                // //console.log('获得的签名图片列表',this.qmImgList)
                            }
                        } else {
                            // //console.log('没有获得图片')
                        }
                    } else {}
                })
                // //console.log('最终获得的签名图片列表---',this.qmImgList)
            })
        },
        getCirculationQmImg(item1,item2){
            //console.log('-----?????-----',item1,item2)
        },
        getUrl(hjmcName){
            let url = ''
            this.qmImgList.forEach(item => {
                if(item.fhjmc == hjmcName){
                    url = item.url
                }
            })
            return url
        },
        delContractClick(){
            var that = this
            that.$confirm({
                title: '您确定要删除当前绑定的行政事务审批单吗?',
                onOk() {
                    let data = {
                        htid: that.formState.id,
                        xzswid: that.formState.fxzswid
                    }
                    deleteSpd(data).then(res => {
                        if(res.success){
                            that.$message.success(res.message)
                            that.formState.fxzswid = ''
                            that.formState.fxzswmc = ''
                        } else {
                            that.$message.warning(res.message)
                        }
                    })
                },
                onCancel() {},
            });
        },
        applyForView(){
            this.$refs.oaModalRef.reviseClick({fpid:this.formState.fxzswid,flcmb:'OA_XZSWSP'})
        },
        selectApplyForClick(){
            this.$refs.SelectContractModal.getData({})
        },
        async getApplicantData(val){
            //console.log(val)
            if(this.formState.id){
                this.formState.fxzswid = val.id
                this.formState.fxzswmc = val.name
                let htData = {
                    ...this.formState,
                    htid: this.formState.id,
                    xzswid: this.formState.fxzswid
                }
                let res = await selectSpd(htData)
                if(res.code == 200){
                    this.$message.success(res.message)
                    let data = {
                        jobid: this.formState.jobid,
                        oaid: this.formState.id,
                        map: {
                            fxzswid: this.formState.fxzswid,
                            fxzswmc: this.formState.fxzswmc,
                        },
                        opinion: '',
                    }
                    saveFlow(data)
                } else {
                    this.formState.fxzswid = ''
                    this.formState.fxzswmc = ''
                    this.$message.warning(res.message)
                }
            } else {
                let data = {
                    ...this.formState,
                    fxzswid: val.id,
                    fxzswmc: val.name,
                    id: ''
                }
                let res = await initBzFlow(data)
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.formState = {
                        ...res.result.nkMap,
                        jobid: res.result.jobMap.id
                    }

                    let htData = {
                        htid: this.formState.id,
                        xzswid: this.formState.fxzswid
                    }
                    selectSpd(htData)
                }
            }
        },
        descriptionsData(hjmc){
            let data = {}
            this.displayList.forEach(item => {
                if(item.hjmc == hjmc){
                    data = {...item}
                }
            })
            return data
        },
        // 意见弹窗
        getInputOpinion(val,valueData){
            let data = this.formState
            data[valueData.hjmc] = val
            this.aform.setFieldsValue({
                fjbrshyj: this.formState.fjbrshyj,
                fksfzrshryj: this.formState.fksfzrshryj,
                fbgsfwshryj: this.formState.fbgsfwshryj,
                fbgscwshryj: this.formState.fbgscwshryj,
                fbgsfzrshryj: this.formState.fbgsfzrshryj
            });
        },
        opinions(val1,val2,val3){
            //console.log(val1,val2,val3)
            this.$refs[`reviewOpinionsRef${val3}`].getData({opinionType:val1,oldVal:val2,valueData:{hjmc:val3}})
        },
        // 右上角关闭后的回调
        closeVisible(e){
            this.$emit('success')
            this.visible = false
        },
        summaryActiveChange(val){
            //console.log(val)
        },
        onSave(){
            let data = {}
            let sdata = {
                jobid: this.formState.jobid,
                oaid: this.formState.id,
                map: {},
                opinion: '',
            }
            if(this.linkName == '合同起草'){
                data = {
                    fhtmc: this.formState.fhtmc,
                    fzbgysmc: this.formState.fzbgysmc,
                    fhtje: this.formState.fhtje,
                    fjyje: this.formState.fjyje,
                    fcgfs: this.formState.fcgfs,
                    fhtbh: this.formState.fhtbh,
                    fssxmbh: this.formState.fssxmbh,
                    fcgdljg: this.formState.fcgdljg,
                    fsfzfcg: this.formState.fsfzfcg,
                    fcgpm: this.formState.fcgpm,
                    fxzswid: this.formState.fxzswid,
                    fxzswmc: this.formState.fxzswmc,
                    id: this.formState.id?this.formState.id:''
                }
                sdata.map = {
                    ...data
                }
                this.formState.id?this.saveFlowFuntion(sdata):this.initBzFlowFuntion(data)
            } else if(this.linkName == '科室经办人审核'){
                sdata.map = {
                    fjbrshyj: this.formState.fjbrshyj,
                    fjbrshr: this.formState.fjbrshr,
                    fjbrshyjsj: this.formState.fjbrshyjsj
                }
                sdata.opinion = this.formState.fjbrshyj,
                this.saveFlowFuntion(sdata)
            } else if(this.linkName == '科室负责人审核'){
                sdata.map = {
                    fksfzrshryj: this.formState.fksfzrshryj,
                    fksfzrshr: this.formState.fksfzrshr,
                    fksfzrshryjsj: this.formState.fksfzrshryjsj
                }
                sdata.opinion = this.formState.fksfzrshryj,
                this.saveFlowFuntion(sdata)
            } else if(this.linkName == '质管科经办人审核'){
                sdata.map = {
                    fzgkjbryj: this.formState.fzgkjbryj,
                    fzgkjbr: this.formState.fzgkjbr,
                    fzgkjbryjsj: this.formState.fzgkjbryjsj
                }
                sdata.opinion = this.formState.fzgkjbryj,
                this.saveFlowFuntion(sdata)
            } else if(this.linkName == '质管科负责人审核'){
                sdata.map = {
                    fzgkfzryj: this.formState.fzgkfzryj,
                    fzgkfzr: this.formState.fzgkfzr,
                    fzgkfzryjsj: this.formState.fzgkfzryjsj
                }
                sdata.opinion = this.formState.fzgkfzryj,
                this.saveFlowFuntion(sdata)
            } else if(this.linkName == '办公室法务审核'){
                sdata.map = {
                    fbgsfwshryj: this.formState.fbgsfwshryj,
                    fbgsfwshr: this.formState.fbgsfwshr,
                    fbgsfwshryjsj: this.formState.fbgsfwshryjsj
                }
                sdata.opinion = this.formState.fbgsfwshryj,
                this.saveFlowFuntion(sdata)
            } else if(this.linkName == '办公室财务审核'){
                sdata.map = {
                    fbgscwshryj: this.formState.fbgscwshryj,
                    fbgscwshr: this.formState.fbgscwshr,
                    fbgscwshryjsj: this.formState.fbgscwshryjsj,
                }
                sdata.opinion = this.formState.fbgscwshryj,
                this.saveFlowFuntion(sdata)
            } else if(this.linkName == '办公室负责人审核'){
                sdata.map = {
                    fbgsfzrshryj: this.formState.fbgsfzrshryj,
                    fbgsfzrshr: this.formState.fbgsfzrshr,
                    fbgsfzrshryjsj: this.formState.fbgsfzrshryjsj,
                }
                sdata.opinion = this.formState.fbgsfzrshryj,
                this.saveFlowFuntion(sdata)
            } else if(that.linkName == '中心主任审批'){
                sdata.map = {
                    fzxldspyj: this.formState.fzxldspyj,
                    fzxldspr: this.formState.fzxldspr,
                    fzxldspyjsj: this.formState.fzxldspyjsj,
                }
                sdata.opinion = this.formState.fzxldspyj,
                this.saveFlowFuntion(sdata)
            }
        },
        onSubmit(){
            this.aform.validateFields((err, values) => {
                if (!err) {
                    var that = this
                    that.$confirm({
                        title: '您确定要提交吗?',
                        onOk() {
                            let data = {
                                jobid: that.formState.jobid,
                                oaid: that.formState.id,
                                map: {},
                                opinion: '',
                            }
                            if(that.linkName == '合同起草'){
                                data.map = {
                                    fhtmc: that.formState.fhtmc,
                                    fzbgysmc: that.formState.fzbgysmc,
                                    fhtje: that.formState.fhtje,
                                    fjyje: that.formState.fjyje,
                                    fcgfs: that.formState.fcgfs,
                                    fhtbh: that.formState.fhtbh,
                                    fssxmbh: that.formState.fssxmbh,
                                    fcgdljg: that.formState.fcgdljg,
                                    fsfzfcg: that.formState.fsfzfcg,
                                    fcgpm: that.formState.fcgpm,
                                    fxzswid: that.formState.fxzswid,
                                    fxzswmc: that.formState.fxzswmc,
                                    id: that.formState.id?that.formState.id:'',
                                    fsffqlc: that.formState.id?'':'是',
                                }
                                that.formState.id?that.submitFlowFuntion(data):that.initBzFlowFuntion(data.map,'1')
                            } else if(that.linkName == '科室经办人审核'){
                                data.map = {
                                    fjbrshyj: that.formState.fjbrshyj,
                                    fjbrshr: that.formState.fjbrshr,
                                    fjbrshyjsj: that.formState.fjbrshyjsj
                                }
                                data.opinion = that.formState.fjbrshyj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '科室负责人审核'){
                                data.map = {
                                    fksfzrshryj: that.formState.fksfzrshryj,
                                    fksfzrshr: that.formState.fksfzrshr,
                                    fksfzrshryjsj: that.formState.fksfzrshryjsj
                                }
                                data.opinion = that.formState.fksfzrshryj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '质管科经办人审核'){
                                data.map = {
                                    fzgkjbryj: that.formState.fzgkjbryj,
                                    fzgkjbr: that.formState.fzgkjbr,
                                    fzgkjbryjsj: that.formState.fzgkjbryjsj
                                }
                                data.opinion = that.formState.fzgkjbryj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '质管科负责人审核'){
                                data.map = {
                                    fzgkfzryj: that.formState.fzgkfzryj,
                                    fzgkfzr: that.formState.fzgkfzr,
                                    fzgkfzryjsj: that.formState.fzgkfzryjsj
                                }
                                data.opinion = that.formState.fzgkfzryj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '办公室法务审核'){
                                data.map = {
                                    fbgsfwshryj: that.formState.fbgsfwshryj,
                                    fbgsfwshr: that.formState.fbgsfwshr,
                                    fbgsfwshryjsj: that.formState.fbgsfwshryjsj
                                }
                                data.opinion = that.formState.fbgsfwshryj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '办公室财务审核'){
                                data.map = {
                                    fbgscwshryj: that.formState.fbgscwshryj,
                                    fbgscwshr: that.formState.fbgscwshr,
                                    fbgscwshryjsj: that.formState.fbgscwshryjsj,
                                }
                                data.opinion = that.formState.fbgscwshryj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '办公室负责人审核'){
                                data.map = {
                                    fbgsfzrshryj: that.formState.fbgsfzrshryj,
                                    fbgsfzrshr: that.formState.fbgsfzrshr,
                                    fbgsfzrshryjsj: that.formState.fbgsfzrshryjsj,
                                }
                                data.opinion = that.formState.fbgsfzrshryj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '分管领导审核'){
                                data.map = {
                                    ffgldshryj: that.formState.ffgldshryj,
                                    ffgldshr: that.formState.ffgldshr,
                                    ffgldshryjsj: that.formState.ffgldshryjsj,
                                }
                                data.opinion = that.formState.ffgldshryj,
                                that.submitFlowFuntion(data)
                            } else if(that.linkName == '中心主任审批'){
                                data.map = {
                                    fzxldspyj: that.formState.fzxldspyj,
                                    fzxldspr: that.formState.fzxldspr,
                                    fzxldspyjsj: that.formState.fzxldspyjsj,
                                }
                                data.opinion = that.formState.fzxldspyj,
                                that.submitFlowFuntion(data)
                            }
                        },
                        onCancel() {},
                    });
                }
            })
        },
        initBzFlowFuntion(data,type){
            this.spinning = true
            initBzFlow(data).then(res => {
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.formState = {}
                    this.formState = {
                        ...res.result.nkMap,
                        jobid: res.result.jobMap.id
                    }
                    if(type){
                        this.closeVisible()
                    }
                } else {
                    this.$message.warning(res.message)
                }
                this.spinning = false
            })
        },
        saveFlowFuntion(data){
            this.spinning = true
            saveFlow(data).then(res => {
                if(res.code == 200){
                    this.$message.success(res.message)
                } else {
                    this.$message.warning(res.message)
                }
                this.spinning = false
            })
        },
        submitFlowFuntion(data){
            this.spinning = true
            submitFlow(data).then(res => {
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.closeVisible()
                } else {
                    this.$message.warning(res.message)
                }
                this.spinning = false
            })
        },
        updataData(){
            var that = this
            that.$confirm({
                title: '您确定修改当前表单数据吗?',
                onOk() {
                    let data = {
                        id: that.formState.id,
                        fhtmc: that.formState.fhtmc,
                        fzbgysmc: that.formState.fzbgysmc,
                        fhtje: that.formState.fhtje,
                        fjyje: that.formState.fjyje,
                        fcgfs: that.formState.fcgfs,
                        fhtbh: that.formState.fhtbh,
                        fssxmbh: that.formState.fssxmbh,
                        fcgdljg: that.formState.fcgdljg,
                        fjbrshyj: that.formState.fjbrshyj,
                        fjbrshr: that.formState.fjbrshr,
                        fjbrshyjsj: that.formState.fjbrshyjsj,
                        fksfzrshryj: that.formState.fksfzrshryj,
                        fksfzrshr: that.formState.fksfzrshr,
                        fksfzrshryjsj: that.formState.fksfzrshryjsj,
                        fbgsfwshryj: that.formState.fbgsfwshryj,
                        fbgsfwshr: that.formState.fbgsfwshr,
                        fbgsfwshryjsj: that.formState.fbgsfwshryjsj,
                        fbgscwshryj: that.formState.fbgscwshryj,
                        fbgscwshr: that.formState.fbgscwshr,
                        fbgscwshryjsj: that.formState.fbgscwshryjsj,
                        fbgsfzrshryj: that.formState.fbgsfzrshryj,
                        fbgsfzrshr: that.formState.fbgsfzrshr,
                        fbgsfzrshryjsj: that.formState.fbgsfzrshryjsj,
                        fzxldspyj: that.formState.fzxldspyj,
                        fzxldspr: that.formState.fzxldspr,
                        fzxldspyjsj: that.formState.fzxldspyjsj,
                    }
                    //console.log(data)
                    that.spinning = true
                    editFuntion(data).then(res => {
                        if(res.code == 200){
                            that.$message.success(res.message)
                        } else {
                            that.$message.warning(res.message)
                        }
                        that.spinning = false
                    })
                },
                onCancel() {
                    //console.log('Cancel');
                },
            });
        },
        // 退回
        returnClick(){
            this.aform.validateFields((err, values) => {
                if (!err) {
                    var that = this
                    that.$confirm({
                        title: '您确定要退回吗?',
                        onOk() {
                            queryJobByJobId({jobid:that.formState.jobid}).then(res => {
                                let list = res.result.jobHistoryList
                                list.forEach(item => {
                                    if(item.fhjmc == '合同起草'){
                                        that.returnFuntion(that.formState.jobid,item.id)
                                    }
                                })
                            })
                        },
                        onCancel() {
                            //console.log('Cancel');
                        },
                    });
                }
            })
        },
        returnFuntion(jobid,ids){
            let returnStr = ''
            if(this.linkName == '科室经办人审核'){
                returnStr = this.formState.fjbrshyj
            } else if(this.linkName == '科室负责人审核'){
                returnStr = this.formState.fksfzrshryj
            } else if(this.linkName == '质管科经办人审核'){
                returnStr = this.formState.fzgkjbryj
            } else if(this.linkName == '质管科负责人审核'){
                returnStr = this.formState.fzgkfzryj
            } else if(this.linkName == '办公室法务审核'){
                returnStr = this.formState.fbgsfwshryj
            } else if(this.linkName == '办公室财务审核'){
                returnStr = this.formState.fbgscwshryj
            } else if(this.linkName == '办公室负责人审核'){
                returnStr = this.formState.fbgsfzrshryj
            } else if(this.linkName == '分管领导审核'){
                returnStr = this.formState.ffgldshryj
            } else if(this.linkName == '中心主任审批'){
                returnStr = this.formState.fzxldspyj
            }
            let data = {
                jobid: jobid,
                opinion: returnStr,
                shjid: ids,
                lcmbbm: '',
                smgflag: '',
                smsContent: '',
            }
            returnUpperzdyFlowJob(data).then(res => {
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.closeVisible()
                } else {
                    this.$message.error(res.message)
                }
            })
        },
        emitFormid(val){
            this.formState = {
                jobid:val.jobMap.id,
                ...val.nkMap
            }
            //console.log('formState===',this.formState)
        },
        printClick(value,qmValue){
            this.$refs.printModalRef.getData(value,qmValue)
        },
    },
}
</script>
<style>
@import url('../../../css/internal-control.css');
</style>
<style lang="less">
.htzfsq-modal{
    .ant-modal {
        background-color: #5ca3e5;
        position: static;
        width: 100%;
        height: 100%;
        top: 0 !important;
        padding-bottom: 0 !important;
        margin: 0 auto !important;
    }
    .ant-modal-content {
        height: 100%;
    }
    .ant-modal-body {
        padding: 15px !important;
        background-color: white;
        overflow-y: scroll;
        height: calc(100vh - 108px) !important;
    }
    .ant-modal-wrap {
        background-color: white;
    }
    .ant-form-item {
        margin-bottom: 0 !important;
    }
    .ant-descriptions-title {
        text-align: center;
        font-size: 22px;
        padding-top: 20px;
    }
    .ant-descriptions-bordered .ant-descriptions-item-label{
            font-weight: 600;
            font-size: 16px;
            color: rgba(0, 0, 0, 0.85);
            background-color:#e6f7ff;
            width: 160px !important;
            text-align: right;
            font-family:simHei !important;
        }
        .ant-descriptions-bordered .ant-descriptions-item-label, .ant-descriptions-bordered .ant-descriptions-item-content{
            padding: 5px 10px !important;
            .ant-form-item {
              margin-bottom: 0 !important;
            }
        }
        .descriptions-label-slot{
            display: flex;
            align-items: center;
            width: 140px !important;//确保左侧固定文字不会换行
            justify-content: center;
        }
        .xhText{
            display: inline-block;
            color: #f5222d;
            line-height: 31px;
            padding-right: 2px;
            font-size: 14px;
            font-weight: 600;
            height: 30px;
        }
        .descriptions-item-center{

        }
        .ant-form-inline .ant-form-item-with-help{
            margin-bottom: 0px !important;
        }
        .zm-form-model{
            display: flex;
            .ant-form-item-control-wrapper{
                flex: 1;
            }
        }
        .ant-form-item-control-wrapper{
            font-family:仿宋_GB2312 !important;
        }
        .ant-descriptions-bordered .ant-descriptions-row{
            border-bottom: 1px solid #e4e3e3;
        }
        .ant-descriptions-bordered .ant-descriptions-item-label, .ant-descriptions-bordered .ant-descriptions-item-content{
            border-right: 1px solid #e4e3e3;
        }
        .ant-descriptions-bordered .ant-descriptions-view{
            border: 1px solid #e4e3e3;
            border-right: 0;
            table {
                width: 100%;
                table-layout: fixed !important;
            }
        }
        .ant-descriptions-row:last-child{
            border-bottom: 0;
        }
        .internalControl-contractPay-summary-table-5{
            .tabs-card-edit-box{
                margin: 5px 15px 0 15px;
                .ant-tabs-bar{
                    // border: 0 !important;
                    border-color: #38f !important;
                    margin: 0 !important;
                }
                .ant-tabs-tab{
                    background: #edeff3 !important;
                    font-size: 14px !important;
                    margin-left: 1px !important;
                    height: 30px !important;
                    line-height: 30px !important;

                }
                .ant-tabs-tab-active{
                    margin: 0 !important;
                    margin-left: 0 !important;
                    margin-right: 1px !important;
                    background-color: #38f !important;
                    color: #fff !important;
                    height: 32px !important;
                    border: 1px solid #38f !important;
                    border-bottom: 0 !important;
                    padding:0 15px !important;

                }
                .ant-tabs-nav-container{
                    height: 32px !important;
                }
            }
        .tab-box-v1{
            border: 1px solid #38f;
            border-top: 0;
            margin: 0 15px;
            overflow-y: scroll;
            padding-bottom: 20px;
            // height: calc((100vh - 260px) / 2 );
            .internalControl-contractPay-model-form-box {
                .yjqm-right-bottom {
                    text-align: right;
                    .yjqmImg {
                        width: 100px;
                        height: 30px;
                        padding-right: 20px;
                    }
                }
            }
        }

        .tabs-card-edit-box2{
            .ant-tabs-tab{
                // margin-right: 5px !important;
                border-bottom-left-radius: 10px !important;
                border-bottom-right-radius: 10px !important;
            }
        }
        .tabs-card-edit-box3{
            .ant-tabs-tab-active{
                background-color: #fff !important;
                color: #38f !important;
            }
        }
        .tabs-card-edit-box4{
            .ant-tabs-tab{
                // margin-right: 5px !important;
                border-top-left-radius: 10px !important;
                border-top-right-radius: 10px !important;
            }
            .ant-tabs-tab-active{
                background-color: #fff !important;
                color: #38f !important;
            }
        }
    }
}
</style>
